'use strict';

const { startCmd } = require('../services/exec');

const Controller = require('egg').Controller;

class ClusterStatusController extends Controller {
    async get_cluster_status() {
        const { ctx } = this;
        var ret_cmd = await startCmd("kubectl describe nodes");
        ctx.body = ret_cmd;
    }
}

module.exports = ClusterStatusController;
/**
 * /get_cluster_status 
 * POST方法，用于获取集群的状态
 * ·入参 
 *      token
 * ·回参 
 *      data [{node对象展开},{node对象展开},{node对象展开},]
 *      code
 *      msg
 */